package com.lanou3g.controller;

import com.lanou3g.model.LoginModel;
import com.lanou3g.pojo.User;
import com.lanou3g.util.JDBCUtil;

import java.sql.*;
import java.util.ArrayList;
import java.util.List;

public class LoginController{
    private LoginModel loginModel =new LoginModel();
    public User login(String username,String password){
        if (username==null||password==null){
            return null;
        }
        if (!loginModel.canLogin(username,password)){
            return null;
        }
        return loginModel.login(username,password);
    }
}